﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace ImageRecognition2.Action
{
    /// <summary>
    /// 
    /// </summary>
    public class ActionImageLayout : AbstractCommand
    {
        private ImageLayout m_ImageLayout = ImageLayout.None;

        /// <summary>
        /// Initializes a new instance of the <see cref="ActionImageLayout"/> class.
        /// </summary>
        public ActionImageLayout()
        { 
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ActionImageLayout"/> class.
        /// </summary>
        /// <param name="_imageLayout">The _image layout.</param>
        public ActionImageLayout(ImageLayout _imageLayout)
        {
            m_ImageLayout = _imageLayout;
        }

        /// <summary>
        /// Runs the specified sender.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        public override void Run(object sender, EventArgs e)
        {
            MainFormSingleton.ActivePictureBox.BackgroundImageLayout = m_ImageLayout;
        }

        public ImageLayout ImageLayout
        {
            get { return m_ImageLayout; }
            set { m_ImageLayout = value; }
        }
    }
}
